import {getBanner} from "@/http/api";

export default {
    namespaced: true,//开启命名空间
    state: {
        bannerList: [],
        // 歌手分类
        artLists:[
            {
                name:'华语',
                area:7,
                type:[1,2,3],
                typeName:[{name:'华语男歌手',id:'1'},{name: '华语女歌手',id:'2'},{name: '华语组合/乐队',id:'3'}],
            },
            {
                name:'欧美',
                area:96,
                type:[1,2,3],
                typeName:[{name:'欧美男歌手',id:'1'},{name: '欧美女歌手',id:'2'},{name: '欧美组合/乐队',id:'3'}]
            },
            {
                name:'日本',
                area:8,
                type:[1,2,3],
                typeName:[{name:'日本男歌手',id:'1'},{name: '日本女歌手',id:'2'},{name: '日本组合/乐队',id:'3'}],
            },
            {
                name:'韩国',
                area:16,
                type:[1,2,3],
                typeName:[{name:'韩国男歌手',id:'1'},{name: '韩国女歌手',id:'2'},{name: '韩国组合/乐队',id:'3'}],
            },
            {
                name:'其他',
                area:0,
                type:[1,2,3],
                typeName:[{name:'其他男歌手',id:'1'},{name: '其他女歌手',id:'2'},{name: '其他组合/乐队',id:'3'}],
            },
        ],
    },
    mutations: {
        GETBANNER(state,data){
            state.bannerList = data.banners
        }
    },
    actions: {
        async GetBanner({commit}) {
            let result = await getBanner()
            commit('GETBANNER',result.data)
        }
    },
    getters: {}
}
